package com.damuzee.system.admin.web;

import javax.servlet.http.HttpServletRequest;

import com.damuzee.system.admin.Constaints;
import com.damuzee.system.admin.domain.EmpUser;

public class RequestUtil {

	/**
	 * 设置用户
	 * 
	 * @param request
	 * @param user
	 */
	public static void setUser(HttpServletRequest request, EmpUser user) {
		request.setAttribute(Constaints.USER_KEY, user);
	}
	
	public static EmpUser getUser(){
		EmpUser user = ContextThreadVariable.getUser() ;
		//EmpUser user  = (EmpUser)request.getAttribute(Constaints.USER_KEY);
		return user ;
	}
}
